\(\int \frac {(f+g x^2)^2 \log (c (d+e x^2)^p)}{x^4} \, dx\) [335]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [F(-2)]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 25, antiderivative size = 169 \[ \int \frac {\left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx=-\frac {2 e f^2 p}{3 d x}-2 g^2 p x-\frac {2 e^{3/2} f^2 p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 d^{3/2}}+\frac {4 \sqrt {e} f g p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d}}+\frac {2 \sqrt {d} g^2 p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {f^2 \log \left (c \left (d+e x^2\right )^p\right )}{3 x^3}-\frac {2 f g \log \left (c \left (d+e x^2\right )^p\right )}{x}+g^2 x \log \left (c \left (d+e x^2\right )^p\right ) \]

[Out]

-2/3*e*f^2*p/d/x-2*g^2*p*x-2/3*e^(3/2)*f^2*p*arctan(x*e^(1/2)/d^(1/2))/d^(3/2)-1/3*f^2*ln(c*(e*x^2+d)^p)/x^3-2
*f*g*ln(c*(e*x^2+d)^p)/x+g^2*x*ln(c*(e*x^2+d)^p)+2*g^2*p*arctan(x*e^(1/2)/d^(1/2))*d^(1/2)/e^(1/2)+4*f*g*p*arc
tan(x*e^(1/2)/d^(1/2))*e^(1/2)/d^(1/2)

Rubi [A] (verified)

Time = 0.09 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {2526, 2498, 327, 211, 2505, 331} \[ \int \frac {\left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx=-\frac {2 e^{3/2} f^2 p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 d^{3/2}}+\frac {4 \sqrt {e} f g p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d}}+\frac {2 \sqrt {d} g^2 p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {f^2 \log \left (c \left (d+e x^2\right )^p\right )}{3 x^3}-\frac {2 f g \log \left (c \left (d+e x^2\right )^p\right )}{x}+g^2 x \log \left (c \left (d+e x^2\right )^p\right )-\frac {2 e f^2 p}{3 d x}-2 g^2 p x \]

[In]

Int[((f + g*x^2)^2*Log[c*(d + e*x^2)^p])/x^4,x]

[Out]

(-2*e*f^2*p)/(3*d*x) - 2*g^2*p*x - (2*e^(3/2)*f^2*p*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/(3*d^(3/2)) + (4*Sqrt[e]*f*g*
p*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/Sqrt[d] + (2*Sqrt[d]*g^2*p*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/Sqrt[e] - (f^2*Log[c*(d
 + e*x^2)^p])/(3*x^3) - (2*f*g*Log[c*(d + e*x^2)^p])/x + g^2*x*Log[c*(d + e*x^2)^p]

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 331

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*c
*(m + 1))), x] - Dist[b*((m + n*(p + 1) + 1)/(a*c^n*(m + 1))), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 2498

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)], x_Symbol] :> Simp[x*Log[c*(d + e*x^n)^p], x] - Dist[e*n*p, Int[
x^n/(d + e*x^n), x], x] /; FreeQ[{c, d, e, n, p}, x]

Rule 2505

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))*((f_.)*(x_))^(m_.), x_Symbol] :> Simp[(f*x)^(m +
 1)*((a + b*Log[c*(d + e*x^n)^p])/(f*(m + 1))), x] - Dist[b*e*n*(p/(f*(m + 1))), Int[x^(n - 1)*((f*x)^(m + 1)/
(d + e*x^n)), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && NeQ[m, -1]

Rule 2526

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.)*((f_) + (g_.)*(x_)^(s_))^(r_.),
 x_Symbol] :> Int[ExpandIntegrand[(a + b*Log[c*(d + e*x^n)^p])^q, x^m*(f + g*x^s)^r, x], x] /; FreeQ[{a, b, c,
 d, e, f, g, m, n, p, q, r, s}, x] && IGtQ[q, 0] && IntegerQ[m] && IntegerQ[r] && IntegerQ[s]

Rubi steps \begin{align*} \text {integral}& = \int \left (g^2 \log \left (c \left (d+e x^2\right )^p\right )+\frac {f^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4}+\frac {2 f g \log \left (c \left (d+e x^2\right )^p\right )}{x^2}\right ) \, dx \\ & = f^2 \int \frac {\log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx+(2 f g) \int \frac {\log \left (c \left (d+e x^2\right )^p\right )}{x^2} \, dx+g^2 \int \log \left (c \left (d+e x^2\right )^p\right ) \, dx \\ & = -\frac {f^2 \log \left (c \left (d+e x^2\right )^p\right )}{3 x^3}-\frac {2 f g \log \left (c \left (d+e x^2\right )^p\right )}{x}+g^2 x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{3} \left (2 e f^2 p\right ) \int \frac {1}{x^2 \left (d+e x^2\right )} \, dx+(4 e f g p) \int \frac {1}{d+e x^2} \, dx-\left (2 e g^2 p\right ) \int \frac {x^2}{d+e x^2} \, dx \\ & = -\frac {2 e f^2 p}{3 d x}-2 g^2 p x+\frac {4 \sqrt {e} f g p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d}}-\frac {f^2 \log \left (c \left (d+e x^2\right )^p\right )}{3 x^3}-\frac {2 f g \log \left (c \left (d+e x^2\right )^p\right )}{x}+g^2 x \log \left (c \left (d+e x^2\right )^p\right )-\frac {\left (2 e^2 f^2 p\right ) \int \frac {1}{d+e x^2} \, dx}{3 d}+\left (2 d g^2 p\right ) \int \frac {1}{d+e x^2} \, dx \\ & = -\frac {2 e f^2 p}{3 d x}-2 g^2 p x-\frac {2 e^{3/2} f^2 p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 d^{3/2}}+\frac {4 \sqrt {e} f g p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d}}+\frac {2 \sqrt {d} g^2 p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {f^2 \log \left (c \left (d+e x^2\right )^p\right )}{3 x^3}-\frac {2 f g \log \left (c \left (d+e x^2\right )^p\right )}{x}+g^2 x \log \left (c \left (d+e x^2\right )^p\right ) \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 0.09 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.67 \[ \int \frac {\left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx=-2 g^2 p x+\frac {2 g (2 e f+d g) p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d} \sqrt {e}}-\frac {2 e f^2 p \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},-\frac {e x^2}{d}\right )}{3 d x}-\frac {\left (f^2+6 f g x^2-3 g^2 x^4\right ) \log \left (c \left (d+e x^2\right )^p\right )}{3 x^3} \]

[In]

Integrate[((f + g*x^2)^2*Log[c*(d + e*x^2)^p])/x^4,x]

[Out]

-2*g^2*p*x + (2*g*(2*e*f + d*g)*p*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/(Sqrt[d]*Sqrt[e]) - (2*e*f^2*p*Hypergeometric2F
1[-1/2, 1, 1/2, -((e*x^2)/d)])/(3*d*x) - ((f^2 + 6*f*g*x^2 - 3*g^2*x^4)*Log[c*(d + e*x^2)^p])/(3*x^3)

Maple [A] (verified)

Time = 2.15 (sec) , antiderivative size = 125, normalized size of antiderivative = 0.74

method result size
parts \(g^{2} x \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )-\frac {f^{2} \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )}{3 x^{3}}-\frac {2 f g \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )}{x}-\frac {2 p e \left (\frac {3 x \,g^{2}}{e}+\frac {\left (-3 g^{2} d^{2}-6 d e f g +e^{2} f^{2}\right ) \arctan \left (\frac {x e}{\sqrt {d e}}\right )}{d e \sqrt {d e}}+\frac {f^{2}}{d x}\right )}{3}\) \(125\)
risch \(-\frac {\left (-3 g^{2} x^{4}+6 f g \,x^{2}+f^{2}\right ) \ln \left (\left (e \,x^{2}+d \right )^{p}\right )}{3 x^{3}}+\frac {6 i \pi d f g \,x^{2} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \right )-3 i \pi d \,g^{2} x^{4} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \right )-3 i \pi d \,g^{2} x^{4} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}-i \pi d \,f^{2} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2}+i \pi d \,f^{2} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}-6 i \pi d f g \,x^{2} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2}+i \pi d \,f^{2} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \right )-6 i \pi d f g \,x^{2} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )-i \pi d \,f^{2} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )+3 i \pi d \,g^{2} x^{4} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )+3 i \pi d \,g^{2} x^{4} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2}+6 i \pi d f g \,x^{2} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}+6 \ln \left (c \right ) d \,g^{2} x^{4}-12 d \,g^{2} p \,x^{4}-12 \ln \left (c \right ) d f g \,x^{2}-4 e \,f^{2} p \,x^{2}+2 \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (9 d^{4} g^{4} p^{2}+36 d^{3} e f \,g^{3} p^{2}+30 d^{2} e^{2} f^{2} g^{2} p^{2}-12 d \,e^{3} f^{3} g \,p^{2}+e^{4} f^{4} p^{2}+d^{3} e \,\textit {\_Z}^{2}\right )}{\sum }\textit {\_R} \ln \left (\left (18 d^{4} g^{4} p^{2}+72 d^{3} e f \,g^{3} p^{2}+60 d^{2} e^{2} f^{2} g^{2} p^{2}-24 d \,e^{3} f^{3} g \,p^{2}+2 e^{4} f^{4} p^{2}+3 \textit {\_R}^{2} d^{3} e \right ) x +\left (-3 d^{4} g^{2} p -6 d^{3} e f g p +d^{2} e^{2} f^{2} p \right ) \textit {\_R} \right )\right ) d \,x^{3}-2 \ln \left (c \right ) d \,f^{2}}{6 d \,x^{3}}\) \(700\)

[In]

int((g*x^2+f)^2*ln(c*(e*x^2+d)^p)/x^4,x,method=_RETURNVERBOSE)

[Out]

g^2*x*ln(c*(e*x^2+d)^p)-1/3*f^2*ln(c*(e*x^2+d)^p)/x^3-2*f*g*ln(c*(e*x^2+d)^p)/x-2/3*p*e*(3*x*g^2/e+1/d/e*(-3*d
^2*g^2-6*d*e*f*g+e^2*f^2)/(d*e)^(1/2)*arctan(x*e/(d*e)^(1/2))+f^2/d/x)

Fricas [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 350, normalized size of antiderivative = 2.07 \[ \int \frac {\left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx=\left [-\frac {6 \, d^{2} e g^{2} p x^{4} + 2 \, d e^{2} f^{2} p x^{2} - {\left (e^{2} f^{2} - 6 \, d e f g - 3 \, d^{2} g^{2}\right )} \sqrt {-d e} p x^{3} \log \left (\frac {e x^{2} - 2 \, \sqrt {-d e} x - d}{e x^{2} + d}\right ) - {\left (3 \, d^{2} e g^{2} p x^{4} - 6 \, d^{2} e f g p x^{2} - d^{2} e f^{2} p\right )} \log \left (e x^{2} + d\right ) - {\left (3 \, d^{2} e g^{2} x^{4} - 6 \, d^{2} e f g x^{2} - d^{2} e f^{2}\right )} \log \left (c\right )}{3 \, d^{2} e x^{3}}, -\frac {6 \, d^{2} e g^{2} p x^{4} + 2 \, d e^{2} f^{2} p x^{2} + 2 \, {\left (e^{2} f^{2} - 6 \, d e f g - 3 \, d^{2} g^{2}\right )} \sqrt {d e} p x^{3} \arctan \left (\frac {\sqrt {d e} x}{d}\right ) - {\left (3 \, d^{2} e g^{2} p x^{4} - 6 \, d^{2} e f g p x^{2} - d^{2} e f^{2} p\right )} \log \left (e x^{2} + d\right ) - {\left (3 \, d^{2} e g^{2} x^{4} - 6 \, d^{2} e f g x^{2} - d^{2} e f^{2}\right )} \log \left (c\right )}{3 \, d^{2} e x^{3}}\right ] \]

[In]

integrate((g*x^2+f)^2*log(c*(e*x^2+d)^p)/x^4,x, algorithm="fricas")

[Out]

[-1/3*(6*d^2*e*g^2*p*x^4 + 2*d*e^2*f^2*p*x^2 - (e^2*f^2 - 6*d*e*f*g - 3*d^2*g^2)*sqrt(-d*e)*p*x^3*log((e*x^2 -
 2*sqrt(-d*e)*x - d)/(e*x^2 + d)) - (3*d^2*e*g^2*p*x^4 - 6*d^2*e*f*g*p*x^2 - d^2*e*f^2*p)*log(e*x^2 + d) - (3*
d^2*e*g^2*x^4 - 6*d^2*e*f*g*x^2 - d^2*e*f^2)*log(c))/(d^2*e*x^3), -1/3*(6*d^2*e*g^2*p*x^4 + 2*d*e^2*f^2*p*x^2
+ 2*(e^2*f^2 - 6*d*e*f*g - 3*d^2*g^2)*sqrt(d*e)*p*x^3*arctan(sqrt(d*e)*x/d) - (3*d^2*e*g^2*p*x^4 - 6*d^2*e*f*g
*p*x^2 - d^2*e*f^2*p)*log(e*x^2 + d) - (3*d^2*e*g^2*x^4 - 6*d^2*e*f*g*x^2 - d^2*e*f^2)*log(c))/(d^2*e*x^3)]

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 381 vs. \(2 (170) = 340\).

Time = 72.93 (sec) , antiderivative size = 381, normalized size of antiderivative = 2.25 \[ \int \frac {\left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx=\begin {cases} \left (- \frac {f^{2}}{3 x^{3}} - \frac {2 f g}{x} + g^{2} x\right ) \log {\left (0^{p} c \right )} & \text {for}\: d = 0 \wedge e = 0 \\- \frac {2 f^{2} p}{9 x^{3}} - \frac {f^{2} \log {\left (c \left (e x^{2}\right )^{p} \right )}}{3 x^{3}} - \frac {4 f g p}{x} - \frac {2 f g \log {\left (c \left (e x^{2}\right )^{p} \right )}}{x} - 2 g^{2} p x + g^{2} x \log {\left (c \left (e x^{2}\right )^{p} \right )} & \text {for}\: d = 0 \\\left (- \frac {f^{2}}{3 x^{3}} - \frac {2 f g}{x} + g^{2} x\right ) \log {\left (c d^{p} \right )} & \text {for}\: e = 0 \\\frac {2 d g^{2} p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{e \sqrt {- \frac {d}{e}}} - \frac {d g^{2} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{e \sqrt {- \frac {d}{e}}} - \frac {f^{2} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{3 x^{3}} + \frac {4 f g p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{\sqrt {- \frac {d}{e}}} - \frac {2 f g \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{\sqrt {- \frac {d}{e}}} - \frac {2 f g \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{x} - 2 g^{2} p x + g^{2} x \log {\left (c \left (d + e x^{2}\right )^{p} \right )} - \frac {2 e f^{2} p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{3 d \sqrt {- \frac {d}{e}}} - \frac {2 e f^{2} p}{3 d x} + \frac {e f^{2} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{3 d \sqrt {- \frac {d}{e}}} & \text {otherwise} \end {cases} \]

[In]

integrate((g*x**2+f)**2*ln(c*(e*x**2+d)**p)/x**4,x)

[Out]

Piecewise(((-f**2/(3*x**3) - 2*f*g/x + g**2*x)*log(0**p*c), Eq(d, 0) & Eq(e, 0)), (-2*f**2*p/(9*x**3) - f**2*l
og(c*(e*x**2)**p)/(3*x**3) - 4*f*g*p/x - 2*f*g*log(c*(e*x**2)**p)/x - 2*g**2*p*x + g**2*x*log(c*(e*x**2)**p),
Eq(d, 0)), ((-f**2/(3*x**3) - 2*f*g/x + g**2*x)*log(c*d**p), Eq(e, 0)), (2*d*g**2*p*log(x - sqrt(-d/e))/(e*sqr
t(-d/e)) - d*g**2*log(c*(d + e*x**2)**p)/(e*sqrt(-d/e)) - f**2*log(c*(d + e*x**2)**p)/(3*x**3) + 4*f*g*p*log(x
 - sqrt(-d/e))/sqrt(-d/e) - 2*f*g*log(c*(d + e*x**2)**p)/sqrt(-d/e) - 2*f*g*log(c*(d + e*x**2)**p)/x - 2*g**2*
p*x + g**2*x*log(c*(d + e*x**2)**p) - 2*e*f**2*p*log(x - sqrt(-d/e))/(3*d*sqrt(-d/e)) - 2*e*f**2*p/(3*d*x) + e
*f**2*log(c*(d + e*x**2)**p)/(3*d*sqrt(-d/e)), True))

Maxima [F(-2)]

Exception generated. \[ \int \frac {\left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate((g*x^2+f)^2*log(c*(e*x^2+d)^p)/x^4,x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(e>0)', see `assume?` for more
details)Is e

Giac [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 135, normalized size of antiderivative = 0.80 \[ \int \frac {\left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx=-{\left (2 \, g^{2} p - g^{2} \log \left (c\right )\right )} x + \frac {1}{3} \, {\left (3 \, g^{2} p x - \frac {6 \, f g p x^{2} + f^{2} p}{x^{3}}\right )} \log \left (e x^{2} + d\right ) - \frac {2 \, {\left (e^{2} f^{2} p - 6 \, d e f g p - 3 \, d^{2} g^{2} p\right )} \arctan \left (\frac {e x}{\sqrt {d e}}\right )}{3 \, \sqrt {d e} d} - \frac {2 \, e f^{2} p x^{2} + 6 \, d f g x^{2} \log \left (c\right ) + d f^{2} \log \left (c\right )}{3 \, d x^{3}} \]

[In]

integrate((g*x^2+f)^2*log(c*(e*x^2+d)^p)/x^4,x, algorithm="giac")

[Out]

-(2*g^2*p - g^2*log(c))*x + 1/3*(3*g^2*p*x - (6*f*g*p*x^2 + f^2*p)/x^3)*log(e*x^2 + d) - 2/3*(e^2*f^2*p - 6*d*
e*f*g*p - 3*d^2*g^2*p)*arctan(e*x/sqrt(d*e))/(sqrt(d*e)*d) - 1/3*(2*e*f^2*p*x^2 + 6*d*f*g*x^2*log(c) + d*f^2*l
og(c))/(d*x^3)

Mupad [B] (verification not implemented)

Time = 1.59 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.64 \[ \int \frac {\left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx=\ln \left (c\,{\left (e\,x^2+d\right )}^p\right )\,\left (\frac {8\,g^2\,x}{3}-\frac {\frac {f^2}{3}+2\,f\,g\,x^2+\frac {5\,g^2\,x^4}{3}}{x^3}\right )-2\,g^2\,p\,x+\frac {2\,p\,\mathrm {atan}\left (\frac {\sqrt {e}\,x}{\sqrt {d}}\right )\,\left (3\,d^2\,g^2+6\,d\,e\,f\,g-e^2\,f^2\right )}{3\,d^{3/2}\,\sqrt {e}}-\frac {2\,e\,f^2\,p}{3\,d\,x} \]

[In]

int((log(c*(d + e*x^2)^p)*(f + g*x^2)^2)/x^4,x)

[Out]

log(c*(d + e*x^2)^p)*((8*g^2*x)/3 - (f^2/3 + (5*g^2*x^4)/3 + 2*f*g*x^2)/x^3) - 2*g^2*p*x + (2*p*atan((e^(1/2)*
x)/d^(1/2))*(3*d^2*g^2 - e^2*f^2 + 6*d*e*f*g))/(3*d^(3/2)*e^(1/2)) - (2*e*f^2*p)/(3*d*x)